<!DOCTYPE html>
<head>

    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,  user-scalable=no">

    <title>修订Ashworth痉挛评定量表</title>

    <style>

        td {
            vertical-align: bottom;
        }

        .group-1 {
        }

        .g-1-title {
            /*color: red;*/
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 30px;
        }

        .group-2 {
            /*border-bottom: solid 1px black;*/
            /*margin-bottom: 30px;*/
        }

        /*.group-2:first-child {*/
        /*border-top: solid 1px black;*/
        /*}*/

        .g-2-title {
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 6.5px;
        }

        .question .q {
            text-align: left;
            font-size: 14px;
            font-weight: bold;
            margin-bottom: 6.5px;
        }

        .question .o {
            text-align: left;
            padding-left: 25px;
            border-bottom: dashed 1px #d0d0d0;
            margin-bottom: 13.5px;

        }

        .question .o label {
            font-weight: 400;
            display: block;
            /*width: 30%;*/
            vertical-align: top;
            margin-bottom: 6.5px;
        }

        .extra {
            border-bottom: dashed 1px #d0d0d0;
        }
    </style>


</head>
<body>
<form>

    <div class="m-b-lg">
        <div style="font-size: 16px;height: 26px;/*margin-bottom: 26px;*/border-bottom: 1px solid #d0d0d0;"
             class="print-div-hr">
            <label class="print-font16">评定内容</label>
        </div>
    </div>
    <div class="col-sm-12 ">
        <div class="group-1 ">

            <div class="group-2">
                <div class="question">
                    <div class="q">
                        修订Ashworth分级评价标准
                    </div>
                    <div class="o">
                        <label>
                            <input type="radio" name="ashworth_radio" value="0">
                            0级：无肌张力增加
                        </label>
                        <label>
                            <input type="radio" name="ashworth_radio" value="1">
                            Ⅰ级：肌张力轻度增加，受累部分被动屈伸时，在活动范围之末时出现最小阻力或突然出现的卡住和放松。
                        </label>
                        <label>
                            <input type="radio" name="ashworth_radio" value="2">
                            Ⅰ+级：肌张力稍增高，在关节活动范围50%之内出现突然卡住，然后在关节活动范围50%之后均呈现最小阻力。
                        </label>
                        <label>
                            <input type="radio" name="ashworth_radio" value="3">
                            Ⅱ级：肌张力增加较明显，关节活动范围的大部分肌张力明显增加，但受累部分仍能较容易的被动活动。
                        </label>
                        <label>
                            <input type="radio" name="ashworth_radio" value="4">
                            Ⅲ级：肌张力严重增高，被动活动困难。
                        </label>
                        <label>
                            <input type="radio" name="ashworth_radio" value="5">
                            Ⅳ级：挛缩，受累部分被动屈伸时呈挛缩状态而不能动。
                        </label>
                    </div>
                </div>
                <div class="extra">
                    <label>部位备注</label>
                    <textarea class="form-control ares-mb" name="part_remark"></textarea>
                </div>

                <div class="question">
                    <div class="q">
                        Clonus分级法
                    </div>
                    <div class="o">
                        <label>
                            <input type="radio" name="clonus_radio" value="0">
                            0级：无阵挛
                        </label>
                        <label>
                            <input type="radio" name="clonus_radio" value="1">
                            Ⅰ级：阵挛持续1-4s
                        </label>
                        <label>
                            <input type="radio" name="clonus_radio" value="2">
                            Ⅱ级：持续5-9s
                        </label>
                        <label>
                            <input type="radio" name="clonus_radio" value="3">
                            Ⅲ级：持续10-14s
                        </label>
                        <label>
                            <input type="radio" name="clonus_radio" value="4">
                            Ⅳ级：持续>15s
                        </label>
                    </div>
                </div>
            </div>

        </div>

    </div>

    <div class="form-group" style="margin-top: 20px" id="submit-buttons">
        <div class="col-sm-12">
            <button class="btn btn-white col-sm-2 col-sm-offset-3" onclick="myReset();" type="button">重置</button>

            <button class="btn btn-primary col-sm-2 col-sm-offset-2" onclick="submitGaugeResult()" type="button"
            >提交
            </button>
        </div>
    </div>
</form>
</body>

<script>
    var totalRatio = 0;

    function getGaugeResult() {
        var result = {};
        result.questions = [];

        result.companion = $("input[name='companion']").val();
        result.partRemark = $("textarea[name='part_remark']").val();

        var questions = $(".group-1 .question");

        for (var i = 0; i < questions.length; i++) {
            var checkedRes = $(questions[i]).find("input[type='radio']:checked");
            if (checkedRes.length == 0) {
                var q = $(questions[i]).find("div.q").text();
                utils.msgError("请填写问题：“" + q + "”");
                $(questions[i]).find("input[type='radio']:first").focus();
                return null;
            } else {
                var res = {};
                res.key = $(checkedRes).attr("name");
                res.value = $(checkedRes).val();

                result.questions.push(res);
            }
        }

        return result;
    }

    function setGaugeResult(result) {
        $("textarea[name='part_remark']").val(result.partRemark);
        $.each(result.questions, function (idx, q) {
            $(".group-1 input[type='radio'][name='" + q.key + "'][value='" + q.value + "']").prop("checked", "checked");
        });
        getCount();
    }

    function setEditable(edit) {
        if (edit) {
            $("input").removeAttr("disabled");
            $("textarea").removeAttr("disabled");
            $(".group-1 input[type='radio']").removeAttr("disabled");
            $("#submit-button").removeClass("hide");
        } else {
            $("input").attr("disabled", "disabled");
            $("textarea").attr("disabled", "disabled");
            $(".group-1 input[type='radio']").attr("disabled", "disabled");
            $("#submit-buttons").addClass("hide");
        }
    }
</script>

</html>
